package com.xzh.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xzh.model.Appointment;
import com.xzh.model.Teachers;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface AppointEcharsMapper extends BaseMapper<Appointment> {
    default List<Map<String, Object>> statistics(){
        QueryWrapper<Appointment> qw = new QueryWrapper<>();
        qw.select("appointment_status", "COUNT(*) as count")
                .groupBy("appointment_status");
        return selectMaps(qw);
    }
}
